﻿using System;
using System.Web.UI;

namespace BizElements.Web
{
    /// <summary>
    /// Lookup control allows users to select an item (key and display value) by using <see cref="SearchProvider"/> objects.
    /// </summary>
    public interface ILookupControl : ISearchClient
    {
        /// <summary>Programatic identifier assigned to the server control.</summary>
        string ID { get; }

        /// <summary>Gets or sets the key value selected in the lookup control.</summary>
        string SelectedValue { get; set; }

        /// <summary>Gets or sets the text content (display value) of the lookup control.</summary>
        string Text { get; set; }

        /// <summary>Gets the control which contains the <b>SelectedValue</b> property.</summary>
        Control SelectedValueControl { get; }

        /// <summary>Gets the control which contains the <b>Text</b> property.</summary>
        Control TextControl { get; }
    }
}